package com.example.myapplication01.jetpack.room;

import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;

import java.util.List;

@Dao
public interface UserDao {

    @Insert
    void insert(User... users);

    @Update
    int update(User... users);

    @Delete
    int delete(User... users);

    @Query("delete from user")
    void clearAll();

    @Query("select * from user")
    LiveData<List<User>> selectAll();

}
